package easypsync.app;

import java.io.File;

public class SyncDirectory {

	private String sourceDir;

	
	/**
	 * e.g.: /mnt/sdcard/dcim/Camera
	 */
	public SyncDirectory(String dir) {
		this.sourceDir = dir;
	}
	
	public void sync() {
		if (sourceDir != null) {
			File imageDirectory = new File(sourceDir);
			if (imageDirectory.exists() && imageDirectory.isDirectory()) {
				SMBTransfer.syncFiles(imageDirectory, imageDirectory.getName());
			}
		}
	}
}
